- Notifications
You must be signed in to change notification settings - Fork 849
/
Copy pathOML4SQL Partitioned Model SVM.dsnb
executable file
·1 lines (1 loc) · 29.1 KB
/
OML4SQL Partitioned Model SVM.dsnb
1
[{"layout":null,"template":null,"templateConfig":null,"name":"OML4SQL Partitioned Model SVM","description":null,"readOnly":false,"type":"low","paragraphs":[{"col":0,"visualizationConfig":null,"hideInIFrame":false,"selectedVisualization":null,"title":null,"message":[],"enabled":true,"result":{"startTime":1715353612246,"interpreter":"md.low","endTime":1715353612307,"results":[],"taskStatus":"SUCCESS","forms":"[]","status":"SUCCESS"},"sizeX":0,"hideCode":true,"width":0,"hideResult":true,"dynamicFormParams":null,"row":0,"hasTitle":false,"hideVizConfig":true,"hideGutter":true,"relations":[],"forms":"[]"},{"col":0,"visualizationConfig":null,"hideInIFrame":false,"selectedVisualization":"html","title":null,"message":["%md","# OML4SQL Partitioned Model","Oracle Machine Learning enables automatically building an ensemble model comprised of multiple sub-models, one for each data partition. Sub-models exist and are used as one model, which results in simplified scoring using top-level model only. The proper sub-model is chosen by system based on row of data to be scored. Partitioned models achieve potentially better accuracy through multiple targeted models. ","","In this notebook, we build an SVM model to predict the number of years a customer resides at their residence but partitioned on customer gender. The model is then used to predict the target first, then predicting the target with prediction details. ","","","Copyright (c) 2024 Oracle Corporation ","###### <a href=\"https://oss.oracle.com/licenses/upl/\" onclick=\"return ! window.open('https://oss.oracle.com/licenses/upl/');\">The Universal Permissive License (UPL), Version 1.0<\/a>","---"],"enabled":true,"result":{"startTime":1715353612401,"interpreter":"md.low","endTime":1715353612478,"results":[{"message":"<h1 id=\"oml4sql-partitioned-model\">OML4SQL Partitioned Model<\/h1>\n<p>Oracle Machine Learning enables automatically building an ensemble model comprised of multiple sub-models, one for each data partition. Sub-models exist and are used as one model, which results in simplified scoring using top-level model only. The proper sub-model is chosen by system based on row of data to be scored. Partitioned models achieve potentially better accuracy through multiple targeted models.<\/p>\n<p>In this notebook, we build an SVM model to predict the number of years a customer resides at their residence but partitioned on customer gender. The model is then used to predict the target first, then predicting the target with prediction details.<\/p>\n<p>Copyright (c) 2024 Oracle Corporation<\/p>\n<h6 id=\"the-universal-permissive-license-upl-version-10\"><a href=\"https://oss.oracle.com/licenses/upl/\" onclick=\"return ! window.open('https://oss.oracle.com/licenses/upl/');\">The Universal Permissive License (UPL), Version 1.0<\/a><\/h6>\n<hr />\n","type":"HTML"}],"taskStatus":"SUCCESS","forms":"[]","status":"SUCCESS"},"sizeX":0,"hideCode":true,"width":12,"hideResult":false,"dynamicFormParams":null,"row":0,"hasTitle":false,"hideVizConfig":true,"hideGutter":true,"relations":[],"forms":"[]"},{"col":0,"visualizationConfig":null,"hideInIFrame":false,"selectedVisualization":"html","title":"For more information...","message":["%md","","* <a href=\"https://docs.oracle.com/en/cloud/paas/autonomous-data-warehouse-cloud/index.html\" target=\"_blank\">Oracle ADW Documentation<\/a>","* <a href=\"https://github.com/oracle/oracle-db-examples/tree/master/machine-learning\" target=\"_blank\">OML folder on Oracle GitHub<\/a>","* <a href=\"https://www.oracle.com/machine-learning\" target=\"_blank\">OML Web Page<\/a>","* <a href=\"https://docs.oracle.com/en/database/oracle/machine-learning/oml4sql/23/dmcon/intro-oracle-machine-learning-SQL.html#GUID-02417CD8-80E8-4324-9E5E-2BE2DCE29527\" target=\"_blank\">OML Partitioned Models<\/a>"],"enabled":true,"result":{"startTime":1715353612593,"interpreter":"md.low","endTime":1715353612654,"results":[{"message":"<ul>\n<li><a href=\"https://docs.oracle.com/en/cloud/paas/autonomous-data-warehouse-cloud/index.html\" target=\"_blank\">Oracle ADW Documentation<\/a><\/li>\n<li><a href=\"https://github.com/oracle/oracle-db-examples/tree/master/machine-learning\" target=\"_blank\">OML folder on Oracle GitHub<\/a><\/li>\n<li><a href=\"https://www.oracle.com/machine-learning\" target=\"_blank\">OML Web Page<\/a><\/li>\n<li><a href=\"https://docs.oracle.com/en/database/oracle/machine-learning/oml4sql/23/dmcon/intro-oracle-machine-learning-SQL.html#GUID-02417CD8-80E8-4324-9E5E-2BE2DCE29527\" target=\"_blank\">OML Partitioned Models<\/a><\/li>\n<\/ul>\n","type":"HTML"}],"taskStatus":"SUCCESS","forms":"[]","status":"SUCCESS"},"sizeX":0,"hideCode":true,"width":12,"hideResult":false,"dynamicFormParams":null,"row":0,"hasTitle":true,"hideVizConfig":true,"hideGutter":true,"relations":[],"forms":"[]"},{"col":0,"visualizationConfig":null,"hideInIFrame":false,"selectedVisualization":"raw","title":"Create dataset with data from SH schema","message":["%script","","BEGIN EXECUTE IMMEDIATE 'DROP TABLE CUSTOMERS_DEMO';","EXCEPTION WHEN OTHERS THEN NULL; END;","/","CREATE TABLE CUSTOMERS_DEMO AS "," SELECT A.CUST_ID, A.CUST_GENDER, A.CUST_MARITAL_STATUS, A.CUST_YEAR_OF_BIRTH, "," A.CUST_INCOME_LEVEL, A.CUST_CREDIT_LIMIT, "," B.EDUCATION, B.AFFINITY_CARD, B.HOUSEHOLD_SIZE, B.OCCUPATION, B.YRS_RESIDENCE, B.Y_BOX_GAMES"," FROM SH.CUSTOMERS A, SH.SUPPLEMENTARY_DEMOGRAPHICS B"," WHERE A.CUST_ID = B.CUST_ID;"," "],"enabled":true,"result":{"startTime":1715353612743,"interpreter":"script.low","endTime":1715353613848,"results":[{"message":"\nPL/SQL procedure successfully completed.\n\n\n---------------------------\n\nTable CUSTOMERS_DEMO created.\n\n\n---------------------------\n","type":"TEXT"}],"taskStatus":"SUCCESS","forms":"[]","status":"SUCCESS"},"sizeX":0,"hideCode":false,"width":8,"hideResult":false,"dynamicFormParams":null,"row":0,"hasTitle":true,"hideVizConfig":false,"hideGutter":true,"relations":[],"forms":"[]"},{"col":0,"visualizationConfig":null,"hideInIFrame":false,"selectedVisualization":"raw","title":"Display number of rows","message":["%sql","","SELECT COUNT(*) ","FROM CUSTOMERS_DEMO;"],"enabled":true,"result":{"startTime":1715353613927,"interpreter":"sql.low","endTime":1715353614111,"results":[{"message":"COUNT(*)\n4500\n","type":"TABLE"}],"taskStatus":"SUCCESS","forms":"[]","status":"SUCCESS"},"sizeX":0,"hideCode":false,"width":4,"hideResult":false,"dynamicFormParams":null,"row":0,"hasTitle":true,"hideVizConfig":false,"hideGutter":true,"relations":[],"forms":"[]"},{"col":0,"visualizationConfig":null,"hideInIFrame":false,"selectedVisualization":"table","title":"View rows from CUSTOMERS_DEMO table","message":["%sql","","SELECT * ","FROM CUSTOMERS_DEMO","FETCH FIRST 10 ROWS ONLY;"],"enabled":true,"result":{"startTime":1715353614194,"interpreter":"sql.low","endTime":1715353614315,"results":[{"message":"CUST_ID\tCUST_GENDER\tCUST_MARITAL_STATUS\tCUST_YEAR_OF_BIRTH\tCUST_INCOME_LEVEL\tCUST_CREDIT_LIMIT\tEDUCATION\tAFFINITY_CARD\tHOUSEHOLD_SIZE\tOCCUPATION\tYRS_RESIDENCE\tY_BOX_GAMES\n100100\tF\tMarried\t1959\tJ: 190,000 - 249,999\t10000\tMasters\t1\t4-5\tProf.\t4\t0\n100200\tM\tNeverM\t1983\tL: 300,000 and above\t9000\t< Bach.\t0\t1\tOther\t2\t1\n100300\tM\tMarried\t1961\tG: 130,000 - 149,999\t10000\tBach.\t1\t3\tProf.\t4\t0\n100400\tM\tDivorc.\t1944\tC: 50,000 - 69,999\t9000\t12th\t0\t6-8\tTransp.\t6\t0\n100500\tM\tNeverM\t1983\tH: 150,000 - 169,999\t15000\tHS-grad\t0\t1\tCrafts\t2\t1\n100600\tM\tMarried\t1978\tK: 250,000 - 299,999\t9000\t11th\t0\t3\tTransp.\t3\t1\n100700\tM\tMarried\t1947\tJ: 190,000 - 249,999\t11000\tHS-grad\t0\t3\tCrafts\t6\t0\n100800\tM\tMarried\t1935\tK: 250,000 - 299,999\t11000\tBach.\t0\t3\tSales\t5\t0\n100900\tM\tMarried\t1959\tF: 110,000 - 129,999\t1500\tHS-grad\t0\t3\tExec.\t4\t0\n101000\tM\tMarried\t1936\tG: 130,000 - 149,999\t7000\t7th-8th\t0\t3\tCrafts\t7\t0\n","type":"TABLE"}],"taskStatus":"SUCCESS","forms":"[]","status":"SUCCESS"},"sizeX":0,"hideCode":false,"width":12,"hideResult":false,"dynamicFormParams":null,"row":0,"hasTitle":true,"hideVizConfig":false,"hideGutter":true,"relations":[],"forms":"[]"},{"col":0,"visualizationConfig":null,"hideInIFrame":false,"selectedVisualization":"html","title":null,"message":["%md","","### Examples of possible setting overrides for Partitioning (Shared Settings)","","If the user does not override the default settings, then relevant settings are determined by the algorithm.","","A complete list of settings can be found in the Documentation link:","","* <a href=\"https://docs.oracle.com/en/database/oracle/oracle-database/23/arpls/DBMS_DATA_MINING.html#GUID-12408982-E738-4D0F-A2BC-84D895E07ABB\" target=\"_blank\">Algorithm Settings<\/a>","* <a href=\"https://docs.oracle.com/en/database/oracle/oracle-database/23/arpls/DBMS_DATA_MINING.html#GUID-24047A09-0542-4870-91D8-329F28B0ED75\" target=\"_blank\">Shared Settings<\/a>","","* Requests the building of a partitioned model. "," The setting value is a comma-separated list of the machine learning attributes to be used to determine the in-list partition key values. These attributes are taken from the input columns, unless an XFORM_LIST parameter is passed to the model. "," If `XFORM_LIST` parameter is passed to the model, then the attributes are taken from the attributes produced by these transformations. ","> v_setlst('ODMS_PARTITION_COLUMNS') := '<Comma separated list of attributes>'"," ","* Controls the parallel building of partitioned models. "," `ODMS_PARTITION_BUILD_INTRA` builds each partition in parallel using all slaves."," `ODMS_PARTITION_BUILD_INTER` builds each partition entirely in a single slave, but multiple partitions may be built at the same time because multiple slaves are active."," `ODMS_PARTITION_BUILD_HYBRID` combines the other two types and is recommended for most situations to adapt to dynamic environments. This is the default value.","> v_setlst('ODMS_PARTITION_BUILD_TYPE') := 'ODMS_PARTITION_BUILD_HYBRID'"],"enabled":true,"result":{"startTime":1715353614392,"interpreter":"md.low","endTime":1715353614474,"results":[{"message":"<h3 id=\"examples-of-possible-setting-overrides-for-partitioning-shared-settings\">Examples of possible setting overrides for Partitioning (Shared Settings)<\/h3>\n<p>If the user does not override the default settings, then relevant settings are determined by the algorithm.<\/p>\n<p>A complete list of settings can be found in the Documentation link:<\/p>\n<ul>\n<li>\n<p><a href=\"https://docs.oracle.com/en/database/oracle/oracle-database/23/arpls/DBMS_DATA_MINING.html#GUID-12408982-E738-4D0F-A2BC-84D895E07ABB\" target=\"_blank\">Algorithm Settings<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https://docs.oracle.com/en/database/oracle/oracle-database/23/arpls/DBMS_DATA_MINING.html#GUID-24047A09-0542-4870-91D8-329F28B0ED75\" target=\"_blank\">Shared Settings<\/a><\/p>\n<\/li>\n<li>\n<p>Requests the building of a partitioned model.\nThe setting value is a comma-separated list of the machine learning attributes to be used to determine the in-list partition key values. These attributes are taken from the input columns, unless an XFORM_LIST parameter is passed to the model.\nIf <code>XFORM_LIST<\/code> parameter is passed to the model, then the attributes are taken from the attributes produced by these transformations.<\/p>\n<\/li>\n<\/ul>\n<blockquote>\n<p>v_setlst('ODMS_PARTITION_COLUMNS') := '<Comma separated list of attributes>'<\/p>\n<\/blockquote>\n<ul>\n<li>Controls the parallel building of partitioned models.<br />\n<code>ODMS_PARTITION_BUILD_INTRA<\/code> builds each partition in parallel using all slaves.\n<code>ODMS_PARTITION_BUILD_INTER<\/code> builds each partition entirely in a single slave, but multiple partitions may be built at the same time because multiple slaves are active.\n<code>ODMS_PARTITION_BUILD_HYBRID<\/code> combines the other two types and is recommended for most situations to adapt to dynamic environments. This is the default value.<\/li>\n<\/ul>\n<blockquote>\n<p>v_setlst('ODMS_PARTITION_BUILD_TYPE') := 'ODMS_PARTITION_BUILD_HYBRID'<\/p>\n<\/blockquote>\n","type":"HTML"}],"taskStatus":"SUCCESS","forms":"[]","status":"SUCCESS"},"sizeX":0,"hideCode":true,"width":12,"hideResult":false,"dynamicFormParams":null,"row":0,"hasTitle":false,"hideVizConfig":true,"hideGutter":true,"relations":[],"forms":"[]"},{"col":0,"visualizationConfig":null,"hideInIFrame":false,"selectedVisualization":"raw","title":"Build SVM Linear model partitioned by CUST_GENDER to predict YRS_RESIDENCE","message":["%script","","BEGIN DBMS_DATA_MINING.DROP_MODEL('SVM_MOD_PARTITIONED');","EXCEPTION WHEN OTHERS THEN NULL; END;","/","DECLARE"," v_setlst DBMS_DATA_MINING.SETTING_LIST;","BEGIN"," v_setlst('ALGO_NAME') := 'ALGO_SUPPORT_VECTOR_MACHINES'; -- choose SVM algorithm"," v_setlst('SVMS_KERNEL_FUNCTION') := 'SVMS_LINEAR'; -- choose linear kernel, which provides coefficients"," v_setlst('ODMS_PARTITION_COLUMNS') := 'CUST_GENDER'; -- choose column on which to partition the data",""," DBMS_DATA_MINING.CREATE_MODEL2("," MODEL_NAME => 'SVM_MOD_PARTITIONED',"," MINING_FUNCTION => 'REGRESSION',"," DATA_QUERY => 'SELECT * FROM CUSTOMERS_DEMO',"," SET_LIST => v_setlst,"," CASE_ID_COLUMN_NAME => 'CUST_ID',"," TARGET_COLUMN_NAME => 'YRS_RESIDENCE');","END;"],"enabled":true,"result":{"startTime":1715353614549,"interpreter":"script.low","endTime":1715353616047,"results":[{"message":"\nPL/SQL procedure successfully completed.\n\n\n---------------------------\n\nPL/SQL procedure successfully completed.\n\n","type":"TEXT"}],"taskStatus":"SUCCESS","forms":"[]","status":"SUCCESS"},"sizeX":0,"hideCode":false,"width":12,"hideResult":false,"dynamicFormParams":null,"row":0,"hasTitle":true,"hideVizConfig":false,"hideGutter":true,"relations":[],"forms":"[]"},{"col":0,"visualizationConfig":null,"hideInIFrame":false,"selectedVisualization":"table","title":"View sub-models of the partitioned model","message":["%sql","","SELECT MODEL_NAME, PARTITION_NAME, COLUMN_NAME, COLUMN_VALUE","FROM ALL_MINING_MODEL_PARTITIONS","WHERE MODEL_NAME = 'SVM_MOD_PARTITIONED';"],"enabled":true,"result":{"startTime":1715353616127,"interpreter":"sql.low","endTime":1715353616447,"results":[{"message":"MODEL_NAME\tPARTITION_NAME\tCOLUMN_NAME\tCOLUMN_VALUE\nSVM_MOD_PARTITIONED\tF\tCUST_GENDER\tF\nSVM_MOD_PARTITIONED\tM\tCUST_GENDER\tM\n","type":"TABLE"}],"taskStatus":"SUCCESS","forms":"[]","status":"SUCCESS"},"sizeX":0,"hideCode":false,"width":7,"hideResult":false,"dynamicFormParams":null,"row":0,"hasTitle":true,"hideVizConfig":false,"hideGutter":true,"relations":[],"forms":"[]"},{"col":0,"visualizationConfig":null,"hideInIFrame":false,"selectedVisualization":"table","title":"List model views","message":["%sql","","SELECT VIEW_NAME, VIEW_TYPE ","FROM USER_MINING_MODEL_VIEWS","WHERE MODEL_NAME='SVM_MOD_PARTITIONED'","ORDER BY VIEW_NAME;"," "],"enabled":true,"result":{"startTime":1715353616526,"interpreter":"sql.low","endTime":1715353616621,"results":[{"message":"VIEW_NAME\tVIEW_TYPE\nDM$VGSVM_MOD_PARTITIONED\tGlobal Name-Value Pairs\nDM$VLSVM_MOD_PARTITIONED\tSVM Linear Coefficients\nDM$VNSVM_MOD_PARTITIONED\tNormalization and Missing Value Handling\nDM$VSSVM_MOD_PARTITIONED\tComputed Settings\nDM$VWSVM_MOD_PARTITIONED\tModel Build Alerts\n","type":"TABLE"}],"taskStatus":"SUCCESS","forms":"[]","status":"SUCCESS"},"sizeX":0,"hideCode":false,"width":5,"hideResult":false,"dynamicFormParams":null,"row":0,"hasTitle":true,"hideVizConfig":false,"hideGutter":true,"relations":[],"forms":"[]"},{"col":0,"visualizationConfig":null,"hideInIFrame":false,"selectedVisualization":"table","title":"View model details - coefficients per partition","message":["%sql","","SELECT PARTITION_NAME, ATTRIBUTE_NAME, ATTRIBUTE_VALUE, "," round(COEFFICIENT,3) COEFFICIENT, "," round(REVERSED_COEFFICIENT,3) REVERSED_COEFFICIENT ","FROM DM$VLSVM_MOD_PARTITIONED;"],"enabled":true,"result":{"startTime":1715353616696,"interpreter":"sql.low","endTime":1715353616880,"results":[{"message":"PARTITION_NAME\tATTRIBUTE_NAME\tATTRIBUTE_VALUE\tCOEFFICIENT\tREVERSED_COEFFICIENT\nM\tCUST_INCOME_LEVEL\tA: Below 30,000\t0.164\t0.164\nM\tCUST_INCOME_LEVEL\tB: 30,000 - 49,999\t0.063\t0.063\nM\tCUST_INCOME_LEVEL\tC: 50,000 - 69,999\t-0.048\t-0.048\nM\tCUST_INCOME_LEVEL\tD: 70,000 - 89,999\t-0.079\t-0.079\nM\tCUST_INCOME_LEVEL\tE: 90,000 - 109,999\t0.032\t0.032\nM\tCUST_INCOME_LEVEL\tF: 110,000 - 129,999\t-0.098\t-0.098\nM\tCUST_INCOME_LEVEL\tG: 130,000 - 149,999\t-0.006\t-0.006\nM\tCUST_INCOME_LEVEL\tH: 150,000 - 169,999\t0.053\t0.053\nM\tCUST_INCOME_LEVEL\tI: 170,000 - 189,999\t-0.043\t-0.043\nM\tCUST_INCOME_LEVEL\tJ: 190,000 - 249,999\t-0.023\t-0.023\nM\tCUST_INCOME_LEVEL\tK: 250,000 - 299,999\t0.009\t0.009\nM\tCUST_INCOME_LEVEL\tL: 300,000 and above\t-0.024\t-0.024\nM\tCUST_MARITAL_STATUS\tDivorc.\t0.127\t0.127\nM\tCUST_MARITAL_STATUS\tMabsent\t-0.024\t-0.024\nM\tCUST_MARITAL_STATUS\tMarried\t0.075\t0.075\nM\tCUST_MARITAL_STATUS\tNeverM\t0.001\t0.001\nM\tCUST_MARITAL_STATUS\tSepar.\t0.059\t0.059\nM\tCUST_MARITAL_STATUS\tWidowed\t-0.238\t-0.238\nM\tEDUCATION\t10th\t-0.058\t-0.058\nM\tEDUCATION\t11th\t-0.113\t-0.113\nM\tEDUCATION\t12th\t-0.138\t-0.138\nM\tEDUCATION\t1st-4th\t0.185\t0.185\nM\tEDUCATION\t5th-6th\t0.046\t0.046\nM\tEDUCATION\t7th-8th\t-0.168\t-0.168\nM\tEDUCATION\t9th\t-0.029\t-0.029\nM\tEDUCATION\t< Bach.\t-0.019\t-0.019\nM\tEDUCATION\tAssoc-A\t0.051\t0.051\nM\tEDUCATION\tAssoc-V\t0.044\t0.044\nM\tEDUCATION\tBach.\t0.031\t0.031\nM\tEDUCATION\tHS-grad\t0.002\t0.002\nM\tEDUCATION\tMasters\t0.033\t0.033\nM\tEDUCATION\tPhD\t0.214\t0.214\nM\tEDUCATION\tPresch.\t-0.495\t-0.495\nM\tEDUCATION\tProfsc\t0.415\t0.415\nM\tHOUSEHOLD_SIZE\t1\t-0.074\t-0.074\nM\tHOUSEHOLD_SIZE\t2\t0.073\t0.073\nM\tHOUSEHOLD_SIZE\t3\t0.044\t0.044\nM\tHOUSEHOLD_SIZE\t6-8\t-0.018\t-0.018\nM\tHOUSEHOLD_SIZE\t9+\t-0.026\t-0.026\nM\tOCCUPATION\t?\t-0.045\t-0.045\nM\tOCCUPATION\tArmed-F\t-0.034\t-0.034\nM\tOCCUPATION\tCleric.\t0.041\t0.041\nM\tOCCUPATION\tCrafts\t0.046\t0.046\nM\tOCCUPATION\tExec.\t0.254\t0.254\nM\tOCCUPATION\tFarming\t0.16\t0.16\nM\tOCCUPATION\tHandler\t-0.065\t-0.065\nM\tOCCUPATION\tHouse-s\t-0.463\t-0.463\nM\tOCCUPATION\tMachine\t-0.001\t-0.001\nM\tOCCUPATION\tOther\t-0.072\t-0.072\nM\tOCCUPATION\tProf.\t0.009\t0.009\nM\tOCCUPATION\tProtec.\t0.025\t0.025\nM\tOCCUPATION\tSales\t0.158\t0.158\nM\tOCCUPATION\tTechSup\t-0.156\t-0.156\nM\tOCCUPATION\tTransp.\t0.141\t0.141\nM\tAFFINITY_CARD\t\t0.039\t0.084\nM\tCUST_CREDIT_LIMIT\t\t0.012\t0\nM\tCUST_YEAR_OF_BIRTH\t\t-0.646\t-0.048\nM\tY_BOX_GAMES\t\t-0.043\t-0.097\nF\tCUST_INCOME_LEVEL\tA: Below 30,000\t0.111\t0.111\nF\tCUST_INCOME_LEVEL\tB: 30,000 - 49,999\t-0.154\t-0.154\nF\tCUST_INCOME_LEVEL\tC: 50,000 - 69,999\t0.022\t0.022\nF\tCUST_INCOME_LEVEL\tD: 70,000 - 89,999\t-0.012\t-0.012\nF\tCUST_INCOME_LEVEL\tE: 90,000 - 109,999\t-0.022\t-0.022\nF\tCUST_INCOME_LEVEL\tF: 110,000 - 129,999\t-0.004\t-0.004\nF\tCUST_INCOME_LEVEL\tG: 130,000 - 149,999\t-0.057\t-0.057\nF\tCUST_INCOME_LEVEL\tH: 150,000 - 169,999\t0.05\t0.05\nF\tCUST_INCOME_LEVEL\tI: 170,000 - 189,999\t0.011\t0.011\nF\tCUST_INCOME_LEVEL\tJ: 190,000 - 249,999\t-0.025\t-0.025\nF\tCUST_INCOME_LEVEL\tK: 250,000 - 299,999\t0.022\t0.022\nF\tCUST_INCOME_LEVEL\tL: 300,000 and above\t0.056\t0.056\nF\tCUST_MARITAL_STATUS\tDivorc.\t0.131\t0.131\nF\tCUST_MARITAL_STATUS\tMabsent\t-0.145\t-0.145\nF\tCUST_MARITAL_STATUS\tMar-AF\t0.177\t0.177\nF\tCUST_MARITAL_STATUS\tMarried\t-0.037\t-0.037\nF\tCUST_MARITAL_STATUS\tNeverM\t0.004\t0.004\nF\tCUST_MARITAL_STATUS\tSepar.\t0.077\t0.077\nF\tCUST_MARITAL_STATUS\tWidowed\t-0.206\t-0.206\nF\tEDUCATION\t10th\t-0.23\t-0.23\nF\tEDUCATION\t11th\t-0.31\t-0.31\nF\tEDUCATION\t12th\t0.098\t0.098\nF\tEDUCATION\t1st-4th\t-0.464\t-0.464\nF\tEDUCATION\t5th-6th\t0.108\t0.108\nF\tEDUCATION\t7th-8th\t-0.287\t-0.287\nF\tEDUCATION\t9th\t-0.138\t-0.138\nF\tEDUCATION\t< Bach.\t-0.079\t-0.079\nF\tEDUCATION\tAssoc-A\t0.041\t0.041\nF\tEDUCATION\tAssoc-V\t0.058\t0.058\nF\tEDUCATION\tBach.\t0.02\t0.02\nF\tEDUCATION\tHS-grad\t0.026\t0.026\nF\tEDUCATION\tMasters\t0.182\t0.182\nF\tEDUCATION\tPhD\t0.355\t0.355\nF\tEDUCATION\tPresch.\t0.23\t0.23\nF\tEDUCATION\tProfsc\t0.39\t0.39\nF\tHOUSEHOLD_SIZE\t1\t-0.057\t-0.057\nF\tHOUSEHOLD_SIZE\t2\t0.106\t0.106\nF\tHOUSEHOLD_SIZE\t4-5\t-0.05\t-0.05\nF\tHOUSEHOLD_SIZE\t6-8\t-0.004\t-0.004\nF\tHOUSEHOLD_SIZE\t9+\t0.006\t0.006\nF\tOCCUPATION\t?\t-0.103\t-0.103\nF\tOCCUPATION\tCleric.\t0.077\t0.077\nF\tOCCUPATION\tCrafts\t0.23\t0.23\nF\tOCCUPATION\tExec.\t0.106\t0.106\nF\tOCCUPATION\tFarming\t-0.422\t-0.422\nF\tOCCUPATION\tHandler\t-0.037\t-0.037\nF\tOCCUPATION\tHouse-s\t-0.258\t-0.258\nF\tOCCUPATION\tMachine\t0.136\t0.136\nF\tOCCUPATION\tOther\t-0.089\t-0.089\nF\tOCCUPATION\tProf.\t0.073\t0.073\nF\tOCCUPATION\tProtec.\t0.072\t0.072\nF\tOCCUPATION\tSales\t0.018\t0.018\nF\tOCCUPATION\tTechSup\t0.071\t0.071\nF\tOCCUPATION\tTransp.\t0.127\t0.127\nF\tAFFINITY_CARD\t\t0.048\t0.155\nF\tCUST_CREDIT_LIMIT\t\t0\t0\nF\tCUST_YEAR_OF_BIRTH\t\t-0.796\t-0.057\nF\tY_BOX_GAMES\t\t0.012\t0.025\nM\t\t\t-0.19\t94.488\nF\t\t\t0.025\t111.124\n","type":"TABLE"}],"taskStatus":"SUCCESS","forms":"[]","status":"SUCCESS"},"sizeX":0,"hideCode":false,"width":6,"hideResult":false,"dynamicFormParams":null,"row":0,"hasTitle":true,"hideVizConfig":false,"hideGutter":true,"relations":[],"forms":"[]"},{"col":0,"visualizationConfig":null,"hideInIFrame":false,"selectedVisualization":"table","title":"Score data using partitioned model","message":["%sql","","SELECT CUST_ID, YRS_RESIDENCE,"," ROUND(PREDICTION(SVM_MOD_PARTITIONED USING *),2) PRED_YRS_RESIDENCE","FROM CUSTOMERS_DEMO","FETCH FIRST 10 ROWS ONLY;"],"enabled":true,"result":{"startTime":1715353616958,"interpreter":"sql.low","endTime":1715353617036,"results":[{"message":"CUST_ID\tYRS_RESIDENCE\tPRED_YRS_RESIDENCE\n100100\t4\t4.71\n100200\t2\t1.62\n100300\t4\t4.66\n100400\t6\t5.9\n100500\t2\t2.07\n100600\t3\t2.74\n100700\t6\t5.78\n100800\t5\t7.22\n100900\t4\t4.88\n101000\t7\t6.49\n","type":"TABLE"}],"taskStatus":"SUCCESS","forms":"[]","status":"SUCCESS"},"sizeX":0,"hideCode":false,"width":6,"hideResult":false,"dynamicFormParams":null,"row":0,"hasTitle":true,"hideVizConfig":false,"hideGutter":true,"relations":[],"forms":"[]"},{"col":0,"visualizationConfig":"[{\"raw\":{},\"area\":{\"series\":{\"availableSeriesElements\":[{\"id\":\"CUST_ID\",\"lineType\":\"straight\",\"borderColor\":\"rgb(25, 95, 116)\",\"borderWidth\":0,\"color\":\"rgb(25, 95, 116)\",\"pattern\":\"auto\",\"markerColor\":\"rgb(25, 95, 116)\",\"markerDisplayed\":\"auto\",\"markerShape\":\"auto\",\"markerSize\":0}]},\"lastColumns\":[\"CUST_ID\",\"YRS_RESIDENCE\",\"PRED_YRS_RESIDENCE\",\"PRED_DET\"],\"version\":1}}]","hideInIFrame":false,"selectedVisualization":"table","title":"Score data using partitioned model with prediction details","message":["%sql","","SELECT CUST_ID, YRS_RESIDENCE,"," ROUND(PREDICTION(SVM_MOD_PARTITIONED USING *),2) PRED_YRS_RESIDENCE,"," PREDICTION_DETAILS(SVM_MOD_PARTITIONED USING *) PRED_DET -- XML WITH TOP ATTRIBUTE NAME, ACTUAL VALUE, WEIGHT, RANK","FROM CUSTOMERS_DEMO","FETCH FIRST 10 ROWS ONLY;"],"enabled":true,"result":{"startTime":1715353617111,"interpreter":"sql.low","endTime":1715353617185,"results":[{"message":"CUST_ID\tYRS_RESIDENCE\tPRED_YRS_RESIDENCE\tPRED_DET\n100100\t4\t4.71\t<Details algorithm=\"Support Vector Machines\"> <Attribute name=\"CUST_YEAR_OF_BIRTH\" actualValue=\"1959\" weight=\".452\" rank=\"1\"/> <Attribute name=\"EDUCATION\" actualValue=\"Masters\" weight=\".169\" rank=\"2\"/> <Attribute name=\"AFFINITY_CARD\" actualValue=\"1\" weight=\".15\" rank=\"3\"/> <Attribute name=\"OCCUPATION\" actualValue=\"Prof.\" weight=\"-.005\" rank=\"4\"/> <Attribute name=\"Y_BOX_GAMES\" actualValue=\"0\" weight=\"-.01\" rank=\"5\"/> <\/Details> \n100200\t2\t1.62\t<Details algorithm=\"Support Vector Machines\"> <Attribute name=\"CUST_CREDIT_LIMIT\" actualValue=\"9000\" weight=\".002\" rank=\"1\"/> <Attribute name=\"CUST_INCOME_LEVEL\" actualValue=\"L: 300,000 and above\" weight=\"-.001\" rank=\"2\"/> <Attribute name=\"EDUCATION\" actualValue=\"< Bach.\" weight=\"-.015\" rank=\"3\"/> <Attribute name=\"AFFINITY_CARD\" actualValue=\"0\" weight=\"-.019\" rank=\"4\"/> <Attribute name=\"Y_BOX_GAMES\" actualValue=\"1\" weight=\"-.052\" rank=\"5\"/> <\/Details> \n100300\t4\t4.66\t<Details algorithm=\"Support Vector Machines\"> <Attribute name=\"CUST_YEAR_OF_BIRTH\" actualValue=\"1961\" weight=\".43\" rank=\"1\"/> <Attribute name=\"AFFINITY_CARD\" actualValue=\"1\" weight=\".192\" rank=\"2\"/> <Attribute name=\"EDUCATION\" actualValue=\"Bach.\" weight=\".094\" rank=\"3\"/> <Attribute name=\"Y_BOX_GAMES\" actualValue=\"0\" weight=\".088\" rank=\"4\"/> <Attribute name=\"CUST_INCOME_LEVEL\" actualValue=\"G: 130,000 - 149,999\" weight=\".055\" rank=\"5\"/> <\/Details> \n100400\t6\t5.9\t<Details algorithm=\"Support Vector Machines\"> <Attribute name=\"CUST_YEAR_OF_BIRTH\" actualValue=\"1944\" weight=\".689\" rank=\"1\"/> <Attribute name=\"OCCUPATION\" actualValue=\"Transp.\" weight=\".069\" rank=\"2\"/> <Attribute name=\"CUST_MARITAL_STATUS\" actualValue=\"Divorc.\" weight=\".037\" rank=\"3\"/> <Attribute name=\"Y_BOX_GAMES\" actualValue=\"0\" weight=\".02\" rank=\"4\"/> <Attribute name=\"CUST_CREDIT_LIMIT\" actualValue=\"9000\" weight=\".002\" rank=\"5\"/> <\/Details> \n100500\t2\t2.07\t<Details algorithm=\"Support Vector Machines\"> <Attribute name=\"CUST_INCOME_LEVEL\" actualValue=\"H: 150,000 - 169,999\" weight=\".058\" rank=\"1\"/> <Attribute name=\"CUST_CREDIT_LIMIT\" actualValue=\"15000\" weight=\".016\" rank=\"2\"/> <Attribute name=\"AFFINITY_CARD\" actualValue=\"0\" weight=\"-.02\" rank=\"3\"/> <Attribute name=\"Y_BOX_GAMES\" actualValue=\"1\" weight=\"-.053\" rank=\"4\"/> <Attribute name=\"CUST_MARITAL_STATUS\" actualValue=\"NeverM\" weight=\"-.056\" rank=\"5\"/> <\/Details> \n100600\t3\t2.74\t<Details algorithm=\"Support Vector Machines\"> <Attribute name=\"OCCUPATION\" actualValue=\"Transp.\" weight=\".093\" rank=\"1\"/> <Attribute name=\"CUST_INCOME_LEVEL\" actualValue=\"K: 250,000 - 299,999\" weight=\".031\" rank=\"2\"/> <Attribute name=\"CUST_CREDIT_LIMIT\" actualValue=\"9000\" weight=\".003\" rank=\"3\"/> <Attribute name=\"AFFINITY_CARD\" actualValue=\"0\" weight=\"-.025\" rank=\"4\"/> <Attribute name=\"Y_BOX_GAMES\" actualValue=\"1\" weight=\"-.068\" rank=\"5\"/> <\/Details> \n100700\t6\t5.78\t<Details algorithm=\"Support Vector Machines\"> <Attribute name=\"CUST_YEAR_OF_BIRTH\" actualValue=\"1947\" weight=\".929\" rank=\"1\"/> <Attribute name=\"Y_BOX_GAMES\" actualValue=\"0\" weight=\".031\" rank=\"2\"/> <Attribute name=\"CUST_CREDIT_LIMIT\" actualValue=\"11000\" weight=\".01\" rank=\"3\"/> <Attribute name=\"AFFINITY_CARD\" actualValue=\"0\" weight=\"-.03\" rank=\"4\"/> <\/Details> \n100800\t5\t7.22\t<Details algorithm=\"Support Vector Machines\"> <Attribute name=\"CUST_YEAR_OF_BIRTH\" actualValue=\"1935\" weight=\".856\" rank=\"1\"/> <Attribute name=\"OCCUPATION\" actualValue=\"Sales\" weight=\".069\" rank=\"2\"/> <Attribute name=\"CUST_INCOME_LEVEL\" actualValue=\"K: 250,000 - 299,999\" weight=\".02\" rank=\"3\"/> <Attribute name=\"EDUCATION\" actualValue=\"Bach.\" weight=\".018\" rank=\"4\"/> <Attribute name=\"Y_BOX_GAMES\" actualValue=\"0\" weight=\".017\" rank=\"5\"/> <\/Details> \n100900\t4\t4.88\t<Details algorithm=\"Support Vector Machines\"> <Attribute name=\"CUST_YEAR_OF_BIRTH\" actualValue=\"1959\" weight=\".391\" rank=\"1\"/> <Attribute name=\"OCCUPATION\" actualValue=\"Exec.\" weight=\".356\" rank=\"2\"/> <Attribute name=\"Y_BOX_GAMES\" actualValue=\"0\" weight=\".046\" rank=\"3\"/> <Attribute name=\"CUST_CREDIT_LIMIT\" actualValue=\"1500\" weight=\"-.034\" rank=\"4\"/> <Attribute name=\"AFFINITY_CARD\" actualValue=\"0\" weight=\"-.044\" rank=\"5\"/> <\/Details> \n101000\t7\t6.49\t<Details algorithm=\"Support Vector Machines\"> <Attribute name=\"CUST_YEAR_OF_BIRTH\" actualValue=\"1936\" weight=\".847\" rank=\"1\"/> <Attribute name=\"Y_BOX_GAMES\" actualValue=\"0\" weight=\".017\" rank=\"2\"/> <Attribute name=\"CUST_INCOME_LEVEL\" actualValue=\"G: 130,000 - 149,999\" weight=\".011\" rank=\"3\"/> <Attribute name=\"CUST_CREDIT_LIMIT\" actualValue=\"7000\" weight=\"-.002\" rank=\"4\"/> <Attribute name=\"AFFINITY_CARD\" actualValue=\"0\" weight=\"-.016\" rank=\"5\"/> <\/Details> \n","type":"TABLE"}],"taskStatus":"SUCCESS","forms":"[]","status":"SUCCESS"},"sizeX":0,"hideCode":false,"width":12,"hideResult":false,"dynamicFormParams":null,"row":0,"hasTitle":true,"hideVizConfig":false,"hideGutter":true,"relations":[],"forms":"[]"},{"col":0,"visualizationConfig":null,"hideInIFrame":false,"selectedVisualization":"html","title":null,"message":["%md","","## End of Script"],"enabled":true,"result":{"startTime":1715353617264,"interpreter":"md.low","endTime":1715353617325,"results":[{"message":"<h2 id=\"end-of-script\">End of Script<\/h2>\n","type":"HTML"}],"taskStatus":"SUCCESS","forms":"[]","status":"SUCCESS"},"sizeX":0,"hideCode":true,"width":12,"hideResult":false,"dynamicFormParams":null,"row":0,"hasTitle":false,"hideVizConfig":true,"hideGutter":true,"relations":[],"forms":"[]"},{"col":0,"visualizationConfig":null,"hideInIFrame":false,"selectedVisualization":"html","title":null,"message":[],"enabled":true,"result":{"startTime":1715353617406,"interpreter":"md.low","endTime":1715353617466,"results":[],"taskStatus":"SUCCESS","forms":"[]","status":"SUCCESS"},"sizeX":0,"hideCode":true,"width":12,"hideResult":true,"dynamicFormParams":null,"row":0,"hasTitle":false,"hideVizConfig":true,"hideGutter":true,"relations":[],"forms":"[]"}],"version":"6","snapshot":false,"tags":null}]